home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  53.9 KB  |  1,894 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    ColorSync API
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  19. __CMAPPLICATION__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  31.     include 'Printing.a'
  32.     ENDIF
  33.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  34.     include 'CMICCProfile.a'
  35.     ENDIF
  36.     IF &TYPE('__DISPLAYS__') = 'UNDEFINED' THEN
  37.     include 'Displays.a'
  38.     ENDIF
  39.  
  40.  
  41. kDefaultCMMSignature            EQU        'appl'
  42. ;  Macintosh 68K trap word 
  43.  
  44. cmTrap                            EQU        $ABEE
  45.  
  46. ;  PicComment IDs 
  47.  
  48. cmBeginProfile                    EQU        220
  49. cmEndProfile                    EQU        221
  50. cmEnableMatching                EQU        222
  51. cmDisableMatching                EQU        223
  52. cmComment                        EQU        224
  53. ;  PicComment selectors for cmComment 
  54.  
  55. cmBeginProfileSel                EQU        0
  56. cmContinueProfileSel            EQU        1
  57. cmEndProfileSel                    EQU        2
  58. cmProfileIdentifierSel            EQU        3
  59.  
  60. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  61.  
  62. cmMatchCMMType                    EQU        $00000001
  63. cmMatchApplProfileVersion        EQU        $00000002
  64. cmMatchDataType                    EQU        $00000004
  65. cmMatchDeviceType                EQU        $00000008
  66. cmMatchDeviceManufacturer        EQU        $00000010
  67. cmMatchDeviceModel                EQU        $00000020
  68. cmMatchDeviceAttributes            EQU        $00000040
  69. cmMatchFlags                    EQU        $00000080
  70. cmMatchOptions                    EQU        $00000100
  71. cmMatchWhite                    EQU        $00000200
  72. cmMatchBlack                    EQU        $00000400
  73. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  74.  
  75. cmMatchAnyProfile                EQU        $00000000
  76. cmMatchProfileCMMType            EQU        $00000001
  77. cmMatchProfileClass                EQU        $00000002
  78. cmMatchDataColorSpace            EQU        $00000004
  79. cmMatchProfileConnectionSpace    EQU        $00000008
  80. cmMatchManufacturer                EQU        $00000010
  81. cmMatchModel                    EQU        $00000020
  82. cmMatchAttributes                EQU        $00000040
  83. cmMatchProfileFlags                EQU        $00000080
  84. ;  Result codes 
  85.  
  86.                                                             ; General Errors 
  87. cmProfileError                    EQU        -170
  88. cmMethodError                    EQU        -171
  89. cmMethodNotFound                EQU        -175                ; CMM not present 
  90. cmProfileNotFound                EQU        -176                ; Responder error 
  91. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  92. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  93. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  94. cmCantDeleteProfile                EQU        -180                ; Responder error 
  95. cmUnsupportedDataType            EQU        -181                ; Responder error 
  96. cmNoCurrentProfile                EQU        -182                ; Responder error 
  97.                                                             ; Profile Access Errors 
  98. cmElementTagNotFound            EQU        -4200
  99. cmIndexRangeErr                    EQU        -4201                ; Tag index out of range 
  100. cmCantDeleteElement                EQU        -4202
  101. cmFatalProfileErr                EQU        -4203
  102. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  103. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  104. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  105.                                                             ; Profile Search Errors 
  106. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  107. cmSearchError                    EQU        -4207
  108. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  109. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  110. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  111. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  112. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  113. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  114. cmRangeOverFlow                    EQU        -4214                ; Color conversion warning that some output color values over/underflowed and were clipped 
  115. cmNamedColorNotFound            EQU        -4216                ; NamedColor not found 
  116. cmCantGamutCheckError            EQU        -4217                ; Gammut checking not supported by this ColorWorld 
  117. ;  deviceType values for ColorSync 1.0 Device Profile access 
  118.  
  119. cmSystemDevice                    EQU        'sys '
  120. cmGDevice                        EQU        'gdev'
  121. ;  Commands for CMFlattenUPP(…) 
  122.  
  123. cmOpenReadSpool                    EQU        1
  124. cmOpenWriteSpool                EQU        2
  125. cmReadSpool                        EQU        3
  126. cmWriteSpool                    EQU        4
  127. cmCloseSpool                    EQU        5
  128. ;  Flags for PostScript-related functions 
  129.  
  130. cmPS7bit                        EQU        1
  131. cmPS8bit                        EQU        2
  132. ;  Flags for profile embedding functions 
  133.  
  134. cmEmbedWholeProfile                EQU        $00000000
  135. cmEmbedProfileIdentifier        EQU        $00000001
  136. ;  Commands for CMAccessUPP(…) 
  137.  
  138. cmOpenReadAccess                EQU        1
  139. cmOpenWriteAccess                EQU        2
  140. cmReadAccess                    EQU        3
  141. cmWriteAccess                    EQU        4
  142. cmCloseAccess                    EQU        5
  143. cmCreateNewAccess                EQU        6
  144. cmAbortWriteAccess                EQU        7
  145. cmBeginAccess                    EQU        8
  146. cmEndAccess                        EQU        9
  147.  
  148. ;  Abstract data type for memory-based Profile 
  149.  
  150.  
  151. ;  Abstract data type for Profile search result 
  152.  
  153.  
  154. ;  Abstract data type for BeginMatching(…) reference 
  155.  
  156.  
  157. ;  Abstract data type for ColorWorld reference 
  158.  
  159.  
  160. ;  Caller-supplied flatten function 
  161. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  162. ;  Caller-supplied filter function for Profile search 
  163. ;  Caller-supplied function for profile access 
  164. ; typedef long                             CMError
  165.  
  166. ;  For 1.0 and 2.0 profile header variants 
  167. ;  CMAppleProfileHeader 
  168. CMAppleProfileHeader    RECORD 0
  169. cm1                         ds        CMHeader        ; offset: $0 (0)
  170.                          ORG 0
  171. cm2                         ds        CM2Header        ; offset: $0 (0)
  172. sizeof                     EQU *                    ; size:   $80 (128)
  173.                         ENDR
  174. ;  Param for CWConcatColorWorld(…) 
  175. CMConcatProfileSet        RECORD 0
  176. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  177. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  178. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  179. sizeof                     EQU *                    ; size:   $8 (8)
  180.                         ENDR
  181. ;  ColorSync color data types 
  182. CMRGBColor                RECORD 0
  183. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  184. green                     ds.w    1                ; offset: $2 (2)
  185. blue                     ds.w    1                ; offset: $4 (4)
  186. sizeof                     EQU *                    ; size:   $6 (6)
  187.                         ENDR
  188. CMCMYKColor                RECORD 0
  189. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  190. magenta                     ds.w    1                ; offset: $2 (2)
  191. yellow                     ds.w    1                ; offset: $4 (4)
  192. black                     ds.w    1                ; offset: $6 (6)
  193. sizeof                     EQU *                    ; size:   $8 (8)
  194.                         ENDR
  195. CMCMYColor                RECORD 0
  196. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  197. magenta                     ds.w    1                ; offset: $2 (2)
  198. yellow                     ds.w    1                ; offset: $4 (4)
  199. sizeof                     EQU *                    ; size:   $6 (6)
  200.                         ENDR
  201. CMHLSColor                RECORD 0
  202. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  203. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  204. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  205. sizeof                     EQU *                    ; size:   $6 (6)
  206.                         ENDR
  207. CMHSVColor                RECORD 0
  208. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  209. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  210. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  211. sizeof                     EQU *                    ; size:   $6 (6)
  212.                         ENDR
  213. CMLabColor                RECORD 0
  214. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  215. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  216. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  217. sizeof                     EQU *                    ; size:   $6 (6)
  218.                         ENDR
  219. CMLuvColor                RECORD 0
  220. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  221. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  222. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  223. sizeof                     EQU *                    ; size:   $6 (6)
  224.                         ENDR
  225. CMYxyColor                RECORD 0
  226. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  227. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  228. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  229. sizeof                     EQU *                    ; size:   $6 (6)
  230.                         ENDR
  231. CMGrayColor                RECORD 0
  232. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  233. sizeof                     EQU *                    ; size:   $2 (2)
  234.                         ENDR
  235. CMMultichannel5Color    RECORD 0
  236. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  237.                          ORG 6
  238. sizeof                     EQU *                    ; size:   $6 (6)
  239.                         ENDR
  240. CMMultichannel6Color    RECORD 0
  241. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  242. sizeof                     EQU *                    ; size:   $6 (6)
  243.                         ENDR
  244. CMMultichannel7Color    RECORD 0
  245. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  246.                          ORG 8
  247. sizeof                     EQU *                    ; size:   $8 (8)
  248.                         ENDR
  249. CMMultichannel8Color    RECORD 0
  250. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  251. sizeof                     EQU *                    ; size:   $8 (8)
  252.                         ENDR
  253. CMNamedColor            RECORD 0
  254. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  255. sizeof                     EQU *                    ; size:   $4 (4)
  256.                         ENDR
  257. CMColor                    RECORD 0
  258. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  259.                          ORG 0
  260. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  261.                          ORG 0
  262. hls                         ds        CMHLSColor        ; offset: $0 (0)
  263.                          ORG 0
  264. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  265.                          ORG 0
  266. Lab                         ds        CMLabColor        ; offset: $0 (0)
  267.                          ORG 0
  268. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  269.                          ORG 0
  270. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  271.                          ORG 0
  272. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  273.                          ORG 0
  274. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  275.                          ORG 0
  276. gray                     ds        CMGrayColor        ; offset: $0 (0)
  277.                          ORG 0
  278. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  279.                          ORG 0
  280. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  281.                          ORG 0
  282. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  283.                          ORG 0
  284. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  285.                          ORG 0
  286. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  287.                          ORG 8
  288. sizeof                     EQU *                    ; size:   $8 (8)
  289.                         ENDR
  290. CMProfileSearchRecord    RECORD 0
  291. header                     ds        CMHeader        ; offset: $0 (0)
  292. fieldMask                 ds.l    1                ; offset: $40 (64)
  293. reserved                 ds.l    2                ; offset: $44 (68)
  294. sizeof                     EQU *                    ; size:   $4C (76)
  295.                         ENDR
  296. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  297.  
  298. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  299.  
  300. ;  Search definition for 2.0 
  301. CMSearchRecord            RECORD 0
  302. CMMType                     ds.l    1                ; offset: $0 (0)
  303. profileClass             ds.l    1                ; offset: $4 (4)
  304. dataColorSpace             ds.l    1                ; offset: $8 (8)
  305. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  306. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  307. deviceModel                 ds.l    1                ; offset: $14 (20)
  308. deviceAttributes         ds.l    2                ; offset: $18 (24)
  309. profileFlags             ds.l    1                ; offset: $20 (32)
  310. searchMask                 ds.l    1                ; offset: $24 (36)
  311. filter                     ds.l    1                ; offset: $28 (40)
  312. sizeof                     EQU *                    ; size:   $2C (44)
  313.                         ENDR
  314. ;  GetCWInfo structures 
  315. CMMInfoRecord            RECORD 0
  316. CMMType                     ds.l    1                ; offset: $0 (0)
  317. CMMVersion                 ds.l    1                ; offset: $4 (4)
  318. sizeof                     EQU *                    ; size:   $8 (8)
  319.                         ENDR
  320. CMCWInfoRecord            RECORD 0
  321. cmmCount                 ds.l    1                ; offset: $0 (0)
  322. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  323. sizeof                     EQU *                    ; size:   $14 (20)
  324.                         ENDR
  325. ;  profile identifier structures 
  326. CMProfileIdentifier        RECORD 0
  327. profileHeader             ds        CM2Header        ; offset: $0 (0)
  328. calibrationDate             ds        CMDateTime        ; offset: $80 (128)
  329. ASCIIProfileDescriptionLen  ds.l 1                ; offset: $8C (140)
  330. ASCIIProfileDescription     ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  variable length 
  331.                          ORG 146
  332. sizeof                     EQU *                    ; size:   $92 (146)
  333.                         ENDR
  334. ; typedef struct CMProfileIdentifier *    CMProfileIdentifierPtr
  335.  
  336. ;  packing formats 
  337.  
  338. cmNoColorPacking                EQU        $0000
  339. cmAlphaSpace                    EQU        $0080
  340. cmWord5ColorPacking                EQU        $0500
  341. cmLong8ColorPacking                EQU        $0800
  342. cmLong10ColorPacking            EQU        $0A00
  343. cmAlphaFirstPacking                EQU        $1000
  344. cmOneBitDirectPacking            EQU        $0B00
  345. cmAlphaLastPacking                EQU        $0000
  346. cm24_8ColorPacking                EQU        $2100
  347. cm32_8ColorPacking                EQU        $0800
  348. cm40_8ColorPacking                EQU        $2200
  349. cm48_8ColorPacking                EQU        $2300
  350. cm56_8ColorPacking                EQU        $2400
  351. cm64_8ColorPacking                EQU        $2500
  352. cm32_16ColorPacking                EQU        $2600
  353. cm48_16ColorPacking                EQU        $2900
  354. cm64_16ColorPacking                EQU        $2A00
  355. cm32_32ColorPacking                EQU        $2700
  356. ;  general colorspaces 
  357.  
  358. cmNoSpace                        EQU        0
  359. cmRGBSpace                        EQU        1
  360. cmCMYKSpace                        EQU        2
  361. cmHSVSpace                        EQU        3
  362. cmHLSSpace                        EQU        4
  363. cmYXYSpace                        EQU        5
  364. cmXYZSpace                        EQU        6
  365. cmLUVSpace                        EQU        7
  366. cmLABSpace                        EQU        8
  367. cmReservedSpace1                EQU        9
  368. cmGraySpace                        EQU        10
  369. cmReservedSpace2                EQU        11
  370. cmGamutResultSpace                EQU        12
  371. cmNamedIndexedSpace                EQU        16
  372. cmMCFiveSpace                    EQU        17
  373. cmMCSixSpace                    EQU        18
  374. cmMCSevenSpace                    EQU        19
  375. cmMCEightSpace                    EQU        20
  376. cmRGBASpace                        EQU        129
  377. cmGrayASpace                    EQU        138
  378. ;  supported CMBitmapColorSpaces - each of the following is a 
  379. ;  combination of a general colospace and a packing formats 
  380.  
  381. cmGray16Space                    EQU        10
  382. cmGrayA32Space                    EQU        138
  383. cmRGB16Space                    EQU        $0501
  384. cmRGB24Space                    EQU        $2101
  385. cmRGB32Space                    EQU        $0801
  386. cmRGB48Space                    EQU        $2901
  387. cmARGB32Space                    EQU        $1881
  388. cmRGBA32Space                    EQU        $0881
  389. cmCMYK32Space                    EQU        $0802
  390. cmCMYK64Space                    EQU        $2A02
  391. cmHSV32Space                    EQU        $0A03
  392. cmHLS32Space                    EQU        $0A04
  393. cmYXY32Space                    EQU        $0A05
  394. cmXYZ32Space                    EQU        $0A06
  395. cmLUV32Space                    EQU        $0A07
  396. cmLAB24Space                    EQU        $2108
  397. cmLAB32Space                    EQU        $0A08
  398. cmLAB48Space                    EQU        $2908
  399. cmGamutResult1Space                EQU        $0B0C
  400. cmNamedIndexed32Space            EQU        $2710
  401. cmMCFive8Space                    EQU        $2211
  402. cmMCSix8Space                    EQU        $2312
  403. cmMCSeven8Space                    EQU        $2413
  404. cmMCEight8Space                    EQU        $2514
  405.  
  406. ; typedef unsigned long                 CMBitmapColorSpace
  407.  
  408. CMBitmap                RECORD 0
  409. image                     ds.l    1                ; offset: $0 (0)
  410. width                     ds.l    1                ; offset: $4 (4)
  411. height                     ds.l    1                ; offset: $8 (8)
  412. rowBytes                 ds.l    1                ; offset: $C (12)
  413. pixelSize                 ds.l    1                ; offset: $10 (16)
  414. space                     ds.l    1                ; offset: $14 (20)
  415. user1                     ds.l    1                ; offset: $18 (24)
  416. user2                     ds.l    1                ; offset: $1C (28)
  417. sizeof                     EQU *                    ; size:   $20 (32)
  418.                         ENDR
  419.  
  420. ;  Classic Print Manager Stuff 
  421.  
  422. enableColorMatchingOp            EQU        12
  423. registerProfileOp                EQU        13
  424.  
  425. cmNoProfileBase                    EQU        0
  426. cmFileBasedProfile                EQU        1
  427. cmHandleBasedProfile            EQU        2
  428. cmPtrBasedProfile                EQU        3
  429. cmProcedureBasedProfile            EQU        4
  430. CMFileLocation            RECORD 0
  431. spec                     ds        FSSpec            ; offset: $0 (0)
  432. sizeof                     EQU *                    ; size:   $46 (70)
  433.                         ENDR
  434. CMHandleLocation        RECORD 0
  435. h                         ds.l    1                ; offset: $0 (0)
  436. sizeof                     EQU *                    ; size:   $4 (4)
  437.                         ENDR
  438. CMPtrLocation            RECORD 0
  439. p                         ds.l    1                ; offset: $0 (0)
  440. sizeof                     EQU *                    ; size:   $4 (4)
  441.                         ENDR
  442. CMProcedureLocation        RECORD 0
  443. proc                     ds.l    1                ; offset: $0 (0)
  444. refCon                     ds.l    1                ; offset: $4 (4)
  445. sizeof                     EQU *                    ; size:   $8 (8)
  446.                         ENDR
  447.  
  448. CMProfLoc                RECORD 0
  449. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  450.                          ORG 0
  451. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  452.                          ORG 0
  453. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  454.                          ORG 0
  455. procLoc                     ds        CMProcedureLocation ; offset: $0 (0)
  456.                          ORG 70
  457. sizeof                     EQU *                    ; size:   $46 (70)
  458.                         ENDR
  459. CMProfileLocation        RECORD 0
  460. locType                     ds.w    1                ; offset: $0 (0)
  461. u                         ds        CMProfLoc        ; offset: $2 (2)
  462. sizeof                     EQU *                    ; size:   $48 (72)
  463.                         ENDR
  464.  
  465. cmOriginalProfileLocationSize    EQU        72
  466. cmCurrentProfileLocationSize    EQU        72
  467.  
  468. ;  Struct and enums used for Profile iteration 
  469.  
  470. cmProfileIterateDataVersion1    EQU        $00010000
  471. CMProfileIterateData    RECORD 0
  472. dataVersion                 ds.l    1                ; offset: $0 (0)        ;  cmProfileIterateDataVersion1 
  473. header                     ds        CM2Header        ; offset: $4 (4)
  474. code                     ds.w    1                ; offset: $84 (132)
  475. name                     ds        Str255            ; offset: $86 (134)
  476. location                 ds        CMProfileLocation ; offset: $186 (390)
  477. sizeof                     EQU *                    ; size:   $1CE (462)
  478.                         ENDR
  479. ;  Caller-supplied callback function for Profile iteration 
  480. ;  Profile file and element access 
  481. ;
  482. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  483. ;
  484.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  485.         Macro
  486.         _CMNewProfile
  487.             move.l              #$0008001B,D0
  488.             dc.w                $ABEE
  489.         EndM
  490.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  491.         IMPORT_CFM_FUNCTION CMNewProfile
  492.     ENDIF
  493.  
  494. ;
  495. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  496. ;
  497.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  498.         Macro
  499.         _CMOpenProfile
  500.             move.l              #$0008001C,D0
  501.             dc.w                $ABEE
  502.         EndM
  503.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION CMOpenProfile
  505.     ENDIF
  506.  
  507. ;
  508. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  511.         Macro
  512.         _CMCloseProfile
  513.             move.l              #$0004001D,D0
  514.             dc.w                $ABEE
  515.         EndM
  516.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  517.         IMPORT_CFM_FUNCTION CMCloseProfile
  518.     ENDIF
  519.  
  520. ;
  521. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  522. ;
  523.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  524.         Macro
  525.         _CMUpdateProfile
  526.             move.l              #$00040034,D0
  527.             dc.w                $ABEE
  528.         EndM
  529.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  530.         IMPORT_CFM_FUNCTION CMUpdateProfile
  531.     ENDIF
  532.  
  533. ;
  534. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         Macro
  538.         _CMCopyProfile
  539.             move.l              #$000C0025,D0
  540.             dc.w                $ABEE
  541.         EndM
  542.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  543.         IMPORT_CFM_FUNCTION CMCopyProfile
  544.     ENDIF
  545.  
  546. ;
  547. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  548. ;
  549.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  550.         Macro
  551.         _CMValidateProfile
  552.             move.l              #$000C0026,D0
  553.             dc.w                $ABEE
  554.         EndM
  555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION CMValidateProfile
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         Macro
  564.         _CMGetProfileLocation
  565.             move.l              #$0008003C,D0
  566.             dc.w                $ABEE
  567.         EndM
  568.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal CMError NCMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile, unsigned long *locationSize)
  574. ;
  575.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  576.         Macro
  577.         _NCMGetProfileLocation
  578.             move.l              #$000C0059,D0
  579.             dc.w                $ABEE
  580.         EndM
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION NCMGetProfileLocation
  583.     ENDIF
  584.  
  585. ;
  586. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  587. ;
  588.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  589.         Macro
  590.         _CMFlattenProfile
  591.             move.l              #$00140031,D0
  592.             dc.w                $ABEE
  593.         EndM
  594.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  595.         IMPORT_CFM_FUNCTION CMFlattenProfile
  596.     ENDIF
  597.  
  598. ;
  599. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  600. ;
  601.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  602.         Macro
  603.         _CMUnflattenProfile
  604.             move.l              #$00100032,D0
  605.             dc.w                $ABEE
  606.         EndM
  607.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  608.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  609.     ENDIF
  610.  
  611. ;
  612. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  613. ;
  614.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  615.         Macro
  616.         _CMGetProfileHeader
  617.             move.l              #$00080039,D0
  618.             dc.w                $ABEE
  619.         EndM
  620.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  621.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  622.     ENDIF
  623.  
  624. ;
  625. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  626. ;
  627.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  628.         Macro
  629.         _CMSetProfileHeader
  630.             move.l              #$0008003A,D0
  631.             dc.w                $ABEE
  632.         EndM
  633.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  634.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  635.     ENDIF
  636.  
  637. ;
  638. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  639. ;
  640.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  641.         Macro
  642.         _CMProfileElementExists
  643.             move.l              #$000C001E,D0
  644.             dc.w                $ABEE
  645.         EndM
  646.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  647.         IMPORT_CFM_FUNCTION CMProfileElementExists
  648.     ENDIF
  649.  
  650. ;
  651. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  652. ;
  653.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  654.         Macro
  655.         _CMCountProfileElements
  656.             move.l              #$0008001F,D0
  657.             dc.w                $ABEE
  658.         EndM
  659.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  660.         IMPORT_CFM_FUNCTION CMCountProfileElements
  661.     ENDIF
  662.  
  663. ;
  664. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  665. ;
  666.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  667.         Macro
  668.         _CMGetProfileElement
  669.             move.l              #$00100020,D0
  670.             dc.w                $ABEE
  671.         EndM
  672.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  673.         IMPORT_CFM_FUNCTION CMGetProfileElement
  674.     ENDIF
  675.  
  676. ;
  677. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  678. ;
  679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  680.         Macro
  681.         _CMSetProfileElement
  682.             move.l              #$00100023,D0
  683.             dc.w                $ABEE
  684.         EndM
  685.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  686.         IMPORT_CFM_FUNCTION CMSetProfileElement
  687.     ENDIF
  688.  
  689. ;
  690. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  691. ;
  692.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  693.         Macro
  694.         _CMSetProfileElementSize
  695.             move.l              #$000C0038,D0
  696.             dc.w                $ABEE
  697.         EndM
  698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  706.         Macro
  707.         _CMSetProfileElementReference
  708.             move.l              #$000C0035,D0
  709.             dc.w                $ABEE
  710.         EndM
  711.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  713.     ENDIF
  714.  
  715. ;
  716. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  717. ;
  718.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  719.         Macro
  720.         _CMGetPartialProfileElement
  721.             move.l              #$00140036,D0
  722.             dc.w                $ABEE
  723.         EndM
  724.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  725.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  726.     ENDIF
  727.  
  728. ;
  729. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  730. ;
  731.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  732.         Macro
  733.         _CMSetPartialProfileElement
  734.             move.l              #$00140037,D0
  735.             dc.w                $ABEE
  736.         EndM
  737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  738.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  739.     ENDIF
  740.  
  741. ;
  742. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  743. ;
  744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  745.         Macro
  746.         _CMGetIndProfileElementInfo
  747.             move.l              #$00140021,D0
  748.             dc.w                $ABEE
  749.         EndM
  750.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  751.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  752.     ENDIF
  753.  
  754. ;
  755. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  756. ;
  757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  758.         Macro
  759.         _CMGetIndProfileElement
  760.             move.l              #$00100022,D0
  761.             dc.w                $ABEE
  762.         EndM
  763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  771.         Macro
  772.         _CMRemoveProfileElement
  773.             move.l              #$00080024,D0
  774.             dc.w                $ABEE
  775.         EndM
  776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  777.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  782. ;
  783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  784.         Macro
  785.         _CMGetScriptProfileDescription
  786.             move.l              #$000C003E,D0
  787.             dc.w                $ABEE
  788.         EndM
  789.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  791.     ENDIF
  792.  
  793. ;
  794. ; pascal CMError CMCloneProfileRef(CMProfileRef prof)
  795. ;
  796.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  797.         Macro
  798.         _CMCloneProfileRef
  799.             move.l              #$00040042,D0
  800.             dc.w                $ABEE
  801.         EndM
  802.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  803.         IMPORT_CFM_FUNCTION CMCloneProfileRef
  804.     ENDIF
  805.  
  806. ;
  807. ; pascal CMError CMGetProfileRefCount(CMProfileRef prof, long *count)
  808. ;
  809.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  810.         Macro
  811.         _CMGetProfileRefCount
  812.             move.l              #$00080043,D0
  813.             dc.w                $ABEE
  814.         EndM
  815.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  816.         IMPORT_CFM_FUNCTION CMGetProfileRefCount
  817.     ENDIF
  818.  
  819. ;
  820. ; pascal CMError CMProfileModified(CMProfileRef prof, Boolean *modified)
  821. ;
  822.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  823.         Macro
  824.         _CMProfileModified
  825.             move.l              #$00080044,D0
  826.             dc.w                $ABEE
  827.         EndM
  828.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION CMProfileModified
  830.     ENDIF
  831.  
  832.  
  833. ;  named Color access functions 
  834. ;
  835. ; pascal CMError CMGetNamedColorInfo(CMProfileRef prof, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
  836. ;
  837.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  838.         Macro
  839.         _CMGetNamedColorInfo
  840.             move.l              #$001C0046,D0
  841.             dc.w                $ABEE
  842.         EndM
  843.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  844.         IMPORT_CFM_FUNCTION CMGetNamedColorInfo
  845.     ENDIF
  846.  
  847. ;
  848. ; pascal CMError CMGetNamedColorValue(CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  849. ;
  850.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  851.         Macro
  852.         _CMGetNamedColorValue
  853.             move.l              #$00100047,D0
  854.             dc.w                $ABEE
  855.         EndM
  856.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  857.         IMPORT_CFM_FUNCTION CMGetNamedColorValue
  858.     ENDIF
  859.  
  860. ;
  861. ; pascal CMError CMGetIndNamedColorValue(CMProfileRef prof, unsigned long index, CMColor *deviceColor, CMColor *PCSColor)
  862. ;
  863.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  864.         Macro
  865.         _CMGetIndNamedColorValue
  866.             move.l              #$00100048,D0
  867.             dc.w                $ABEE
  868.         EndM
  869.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  870.         IMPORT_CFM_FUNCTION CMGetIndNamedColorValue
  871.     ENDIF
  872.  
  873. ;
  874. ; pascal CMError CMGetNamedColorIndex(CMProfileRef prof, StringPtr name, unsigned long *index)
  875. ;
  876.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  877.         Macro
  878.         _CMGetNamedColorIndex
  879.             move.l              #$000C0049,D0
  880.             dc.w                $ABEE
  881.         EndM
  882.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  883.         IMPORT_CFM_FUNCTION CMGetNamedColorIndex
  884.     ENDIF
  885.  
  886. ;
  887. ; pascal CMError CMGetNamedColorName(CMProfileRef prof, unsigned long index, StringPtr name)
  888. ;
  889.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  890.         Macro
  891.         _CMGetNamedColorName
  892.             move.l              #$000C004A,D0
  893.             dc.w                $ABEE
  894.         EndM
  895.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  896.         IMPORT_CFM_FUNCTION CMGetNamedColorName
  897.     ENDIF
  898.  
  899.  
  900. ;  Low-level matching functions 
  901. ;
  902. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  903. ;
  904.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  905.         Macro
  906.         _NCWNewColorWorld
  907.             move.l              #$000C0014,D0
  908.             dc.w                $ABEE
  909.         EndM
  910.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  911.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  912.     ENDIF
  913.  
  914. ;
  915. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  916. ;
  917.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  918.         Macro
  919.         _CWConcatColorWorld
  920.             move.l              #$00080015,D0
  921.             dc.w                $ABEE
  922.         EndM
  923.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  924.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  929. ;
  930.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  931.         Macro
  932.         _CWNewLinkProfile
  933.             move.l              #$000C0033,D0
  934.             dc.w                $ABEE
  935.         EndM
  936.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  937.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  938.     ENDIF
  939.  
  940. ;
  941. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  942. ;
  943.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  944.         Macro
  945.         _CWDisposeColorWorld
  946.             move.l              #$00040001,D0
  947.             dc.w                $ABEE
  948.         EndM
  949.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  950.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  951.     ENDIF
  952.  
  953. ;
  954. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  955. ;
  956.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  957.         Macro
  958.         _CWMatchColors
  959.             move.l              #$000C0002,D0
  960.             dc.w                $ABEE
  961.         EndM
  962.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  963.         IMPORT_CFM_FUNCTION CWMatchColors
  964.     ENDIF
  965.  
  966. ;
  967. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  968. ;
  969.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  970.         Macro
  971.         _CWCheckColors
  972.             move.l              #$00100003,D0
  973.             dc.w                $ABEE
  974.         EndM
  975.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  976.         IMPORT_CFM_FUNCTION CWCheckColors
  977.     ENDIF
  978.  
  979.  
  980. ;  Bitmap matching 
  981. ;
  982. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  983. ;
  984.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  985.         Macro
  986.         _CWMatchBitmap
  987.             move.l              #$0010002C,D0
  988.             dc.w                $ABEE
  989.         EndM
  990.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  991.         IMPORT_CFM_FUNCTION CWMatchBitmap
  992.     ENDIF
  993.  
  994. ;
  995. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  996. ;
  997.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  998.         Macro
  999.         _CWCheckBitmap
  1000.             move.l              #$0014002D,D0
  1001.             dc.w                $ABEE
  1002.         EndM
  1003.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1004.         IMPORT_CFM_FUNCTION CWCheckBitmap
  1005.     ENDIF
  1006.  
  1007.  
  1008. ;  Quickdraw-specific matching 
  1009. ;
  1010. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  1011. ;
  1012.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1013.         Macro
  1014.         _CWMatchPixMap
  1015.             move.l              #$00100004,D0
  1016.             dc.w                $ABEE
  1017.         EndM
  1018.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1019.         IMPORT_CFM_FUNCTION CWMatchPixMap
  1020.     ENDIF
  1021.  
  1022. ;
  1023. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  1024. ;
  1025.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1026.         Macro
  1027.         _CWCheckPixMap
  1028.             move.l              #$00140007,D0
  1029.             dc.w                $ABEE
  1030.         EndM
  1031.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1032.         IMPORT_CFM_FUNCTION CWCheckPixMap
  1033.     ENDIF
  1034.  
  1035. ;
  1036. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  1037. ;
  1038.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1039.         Macro
  1040.         _NCMBeginMatching
  1041.             move.l              #$000C0016,D0
  1042.             dc.w                $ABEE
  1043.         EndM
  1044.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1045.         IMPORT_CFM_FUNCTION NCMBeginMatching
  1046.     ENDIF
  1047.  
  1048. ;
  1049. ; pascal void CMEndMatching(CMMatchRef myRef)
  1050. ;
  1051.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1052.         Macro
  1053.         _CMEndMatching
  1054.             move.l              #$0004000B,D0
  1055.             dc.w                $ABEE
  1056.         EndM
  1057.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1058.         IMPORT_CFM_FUNCTION CMEndMatching
  1059.     ENDIF
  1060.  
  1061. ;
  1062. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1063. ;
  1064.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1065.         Macro
  1066.         _NCMDrawMatchedPicture
  1067.             move.l              #$000C0017,D0
  1068.             dc.w                $ABEE
  1069.         EndM
  1070.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1071.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  1072.     ENDIF
  1073.  
  1074. ;
  1075. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1076. ;
  1077.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1078.         Macro
  1079.         _CMEnableMatchingComment
  1080.             move.l              #$0002000D,D0
  1081.             dc.w                $ABEE
  1082.         EndM
  1083.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1084.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  1085.     ENDIF
  1086.  
  1087. ;
  1088. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  1089. ;
  1090.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1091.         Macro
  1092.         _NCMUseProfileComment
  1093.             move.l              #$0008003B,D0
  1094.             dc.w                $ABEE
  1095.         EndM
  1096.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1097.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  1098.     ENDIF
  1099.  
  1100. ;
  1101. ; pascal CMError CMCreateProfileIdentifier(CMProfileRef prof, CMProfileIdentifierPtr ident, unsigned long *size)
  1102. ;
  1103.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1104.         Macro
  1105.         _CMCreateProfileIdentifier
  1106.             move.l              #$000C0041,D0
  1107.             dc.w                $ABEE
  1108.         EndM
  1109.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1110.         IMPORT_CFM_FUNCTION CMCreateProfileIdentifier
  1111.     ENDIF
  1112.  
  1113.  
  1114. ;  System Profile access 
  1115. ;
  1116. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1117. ;
  1118.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1119.         Macro
  1120.         _CMGetSystemProfile
  1121.             move.l              #$00040018,D0
  1122.             dc.w                $ABEE
  1123.         EndM
  1124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1125.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  1126.     ENDIF
  1127.  
  1128. ;
  1129. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1130. ;
  1131.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1132.         Macro
  1133.         _CMSetSystemProfile
  1134.             move.l              #$00040019,D0
  1135.             dc.w                $ABEE
  1136.         EndM
  1137.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1138.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  1139.     ENDIF
  1140.  
  1141. ;
  1142. ; pascal CMError CMGetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef *prof)
  1143. ;
  1144.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1145.         Macro
  1146.         _CMGetDefaultProfileBySpace
  1147.             move.l              #$0008005A,D0
  1148.             dc.w                $ABEE
  1149.         EndM
  1150.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1151.         IMPORT_CFM_FUNCTION CMGetDefaultProfileBySpace
  1152.     ENDIF
  1153.  
  1154. ;
  1155. ; pascal CMError CMSetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef prof)
  1156. ;
  1157.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1158.         Macro
  1159.         _CMSetDefaultProfileBySpace
  1160.             move.l              #$0008005B,D0
  1161.             dc.w                $ABEE
  1162.         EndM
  1163.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1164.         IMPORT_CFM_FUNCTION CMSetDefaultProfileBySpace
  1165.     ENDIF
  1166.  
  1167. ;
  1168. ; pascal CMError CMGetProfileByAVID(AVIDType theAVID, CMProfileRef *prof)
  1169. ;
  1170.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1171.         Macro
  1172.         _CMGetProfileByAVID
  1173.             move.l              #$0008005C,D0
  1174.             dc.w                $ABEE
  1175.         EndM
  1176.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1177.         IMPORT_CFM_FUNCTION CMGetProfileByAVID
  1178.     ENDIF
  1179.  
  1180. ;
  1181. ; pascal CMError CMSetProfileByAVID(AVIDType theAVID, CMProfileRef prof)
  1182. ;
  1183.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1184.         Macro
  1185.         _CMSetProfileByAVID
  1186.             move.l              #$0008005D,D0
  1187.             dc.w                $ABEE
  1188.         EndM
  1189.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1190.         IMPORT_CFM_FUNCTION CMSetProfileByAVID
  1191.     ENDIF
  1192.  
  1193.  
  1194. ;  External Profile Management 
  1195. ;
  1196. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  1197. ;
  1198.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1199.         Macro
  1200.         _CMNewProfileSearch
  1201.             move.l              #$00100027,D0
  1202.             dc.w                $ABEE
  1203.         EndM
  1204.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1205.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  1206.     ENDIF
  1207.  
  1208. ;
  1209. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  1210. ;
  1211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1212.         Macro
  1213.         _CMUpdateProfileSearch
  1214.             move.l              #$000C0028,D0
  1215.             dc.w                $ABEE
  1216.         EndM
  1217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1218.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  1219.     ENDIF
  1220.  
  1221. ;
  1222. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1223. ;
  1224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1225.         Macro
  1226.         _CMDisposeProfileSearch
  1227.             move.l              #$00040029,D0
  1228.             dc.w                $ABEE
  1229.         EndM
  1230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1231.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  1232.     ENDIF
  1233.  
  1234. ;
  1235. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  1236. ;
  1237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1238.         Macro
  1239.         _CMSearchGetIndProfile
  1240.             move.l              #$000C002A,D0
  1241.             dc.w                $ABEE
  1242.         EndM
  1243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1244.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  1245.     ENDIF
  1246.  
  1247. ;
  1248. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  1249. ;
  1250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1251.         Macro
  1252.         _CMSearchGetIndProfileFileSpec
  1253.             move.l              #$000C002B,D0
  1254.             dc.w                $ABEE
  1255.         EndM
  1256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1257.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  1258.     ENDIF
  1259.  
  1260. ;
  1261. ; pascal CMError CMProfileIdentifierFolderSearch(CMProfileIdentifierPtr ident, unsigned long *matchedCount, CMProfileSearchRef *searchResult)
  1262. ;
  1263.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1264.         Macro
  1265.         _CMProfileIdentifierFolderSearch
  1266.             move.l              #$000C003F,D0
  1267.             dc.w                $ABEE
  1268.         EndM
  1269.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1270.         IMPORT_CFM_FUNCTION CMProfileIdentifierFolderSearch
  1271.     ENDIF
  1272.  
  1273. ;
  1274. ; pascal CMError CMProfileIdentifierListSearch(CMProfileIdentifierPtr ident, CMProfileRef *profileList, unsigned long listSize, unsigned long *matchedCount, CMProfileRef *matchedList)
  1275. ;
  1276.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1277.         Macro
  1278.         _CMProfileIdentifierListSearch
  1279.             move.l              #$00140040,D0
  1280.             dc.w                $ABEE
  1281.         EndM
  1282.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1283.         IMPORT_CFM_FUNCTION CMProfileIdentifierListSearch
  1284.     ENDIF
  1285.  
  1286. ;
  1287. ; pascal CMError CMIterateColorSyncFolder(CMProfileIterateUPP proc, unsigned long *seed, unsigned long *count, void *refCon)
  1288. ;
  1289.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1290.         Macro
  1291.         _CMIterateColorSyncFolder
  1292.             move.l              #$00100058,D0
  1293.             dc.w                $ABEE
  1294.         EndM
  1295.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1296.         IMPORT_CFM_FUNCTION CMIterateColorSyncFolder
  1297.     ENDIF
  1298.  
  1299.  
  1300. ;  Utilities 
  1301. ;
  1302. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1303. ;
  1304.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1305.         Macro
  1306.         _CMGetColorSyncFolderSpec
  1307.             move.l              #$000C0011,D0
  1308.             dc.w                $ABEE
  1309.         EndM
  1310.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1311.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  1312.     ENDIF
  1313.  
  1314. ;
  1315. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1316. ;
  1317.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1318.         Macro
  1319.         _CMGetCWInfo
  1320.             move.l              #$0008001A,D0
  1321.             dc.w                $ABEE
  1322.         EndM
  1323.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1324.         IMPORT_CFM_FUNCTION CMGetCWInfo
  1325.     ENDIF
  1326.  
  1327. ;
  1328. ; pascal CMError CMConvertProfile2to1(CMProfileRef profv2, CMProfileHandle *profv1)
  1329. ;
  1330.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1331.         Macro
  1332.         _CMConvertProfile2to1
  1333.             move.l              #$00080045,D0
  1334.             dc.w                $ABEE
  1335.         EndM
  1336.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1337.         IMPORT_CFM_FUNCTION CMConvertProfile2to1
  1338.     ENDIF
  1339.  
  1340. ;
  1341. ; pascal CMError CMGetPreferredCMM(OSType *cmmType, Boolean *preferredCMMnotfound)
  1342. ;
  1343.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1344.         Macro
  1345.         _CMGetPreferredCMM
  1346.             move.l              #$0008005E,D0
  1347.             dc.w                $ABEE
  1348.         EndM
  1349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1350.         IMPORT_CFM_FUNCTION CMGetPreferredCMM
  1351.     ENDIF
  1352.  
  1353.  
  1354.  
  1355. ;  ColorSpace conversion functions 
  1356. ;
  1357. ; pascal CMError CMConvertXYZToLab(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1358. ;
  1359.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1360.         Macro
  1361.         _CMConvertXYZToLab
  1362.             move.l              #$0010004B,D0
  1363.             dc.w                $ABEE
  1364.         EndM
  1365.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1366.         IMPORT_CFM_FUNCTION CMConvertXYZToLab
  1367.     ENDIF
  1368.  
  1369. ;
  1370. ; pascal CMError CMConvertLabToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1371. ;
  1372.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1373.         Macro
  1374.         _CMConvertLabToXYZ
  1375.             move.l              #$0010004C,D0
  1376.             dc.w                $ABEE
  1377.         EndM
  1378.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1379.         IMPORT_CFM_FUNCTION CMConvertLabToXYZ
  1380.     ENDIF
  1381.  
  1382. ;
  1383. ; pascal CMError CMConvertXYZToLuv(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1384. ;
  1385.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1386.         Macro
  1387.         _CMConvertXYZToLuv
  1388.             move.l              #$0010004D,D0
  1389.             dc.w                $ABEE
  1390.         EndM
  1391.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1392.         IMPORT_CFM_FUNCTION CMConvertXYZToLuv
  1393.     ENDIF
  1394.  
  1395. ;
  1396. ; pascal CMError CMConvertLuvToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1397. ;
  1398.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1399.         Macro
  1400.         _CMConvertLuvToXYZ
  1401.             move.l              #$0010004E,D0
  1402.             dc.w                $ABEE
  1403.         EndM
  1404.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1405.         IMPORT_CFM_FUNCTION CMConvertLuvToXYZ
  1406.     ENDIF
  1407.  
  1408. ;
  1409. ; pascal CMError CMConvertXYZToYxy(const CMColor *src, CMColor *dst, unsigned long count)
  1410. ;
  1411.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1412.         Macro
  1413.         _CMConvertXYZToYxy
  1414.             move.l              #$000C004F,D0
  1415.             dc.w                $ABEE
  1416.         EndM
  1417.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1418.         IMPORT_CFM_FUNCTION CMConvertXYZToYxy
  1419.     ENDIF
  1420.  
  1421. ;
  1422. ; pascal CMError CMConvertYxyToXYZ(const CMColor *src, CMColor *dst, unsigned long count)
  1423. ;
  1424.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1425.         Macro
  1426.         _CMConvertYxyToXYZ
  1427.             move.l              #$000C0050,D0
  1428.             dc.w                $ABEE
  1429.         EndM
  1430.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1431.         IMPORT_CFM_FUNCTION CMConvertYxyToXYZ
  1432.     ENDIF
  1433.  
  1434. ;
  1435. ; pascal CMError CMConvertRGBToHLS(const CMColor *src, CMColor *dst, unsigned long count)
  1436. ;
  1437.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1438.         Macro
  1439.         _CMConvertRGBToHLS
  1440.             move.l              #$000C0051,D0
  1441.             dc.w                $ABEE
  1442.         EndM
  1443.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1444.         IMPORT_CFM_FUNCTION CMConvertRGBToHLS
  1445.     ENDIF
  1446.  
  1447. ;
  1448. ; pascal CMError CMConvertHLSToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1449. ;
  1450.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1451.         Macro
  1452.         _CMConvertHLSToRGB
  1453.             move.l              #$000C0052,D0
  1454.             dc.w                $ABEE
  1455.         EndM
  1456.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1457.         IMPORT_CFM_FUNCTION CMConvertHLSToRGB
  1458.     ENDIF
  1459.  
  1460. ;
  1461. ; pascal CMError CMConvertRGBToHSV(const CMColor *src, CMColor *dst, unsigned long count)
  1462. ;
  1463.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1464.         Macro
  1465.         _CMConvertRGBToHSV
  1466.             move.l              #$000C0053,D0
  1467.             dc.w                $ABEE
  1468.         EndM
  1469.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1470.         IMPORT_CFM_FUNCTION CMConvertRGBToHSV
  1471.     ENDIF
  1472.  
  1473. ;
  1474. ; pascal CMError CMConvertHSVToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1475. ;
  1476.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1477.         Macro
  1478.         _CMConvertHSVToRGB
  1479.             move.l              #$000C0054,D0
  1480.             dc.w                $ABEE
  1481.         EndM
  1482.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1483.         IMPORT_CFM_FUNCTION CMConvertHSVToRGB
  1484.     ENDIF
  1485.  
  1486. ;
  1487. ; pascal CMError CMConvertRGBToGray(const CMColor *src, CMColor *dst, unsigned long count)
  1488. ;
  1489.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1490.         Macro
  1491.         _CMConvertRGBToGray
  1492.             move.l              #$000C0055,D0
  1493.             dc.w                $ABEE
  1494.         EndM
  1495.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1496.         IMPORT_CFM_FUNCTION CMConvertRGBToGray
  1497.     ENDIF
  1498.  
  1499. ;
  1500. ; pascal CMError CMConvertXYZToFixedXYZ(const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  1501. ;
  1502.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1503.         Macro
  1504.         _CMConvertXYZToFixedXYZ
  1505.             move.l              #$000C0056,D0
  1506.             dc.w                $ABEE
  1507.         EndM
  1508.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1509.         IMPORT_CFM_FUNCTION CMConvertXYZToFixedXYZ
  1510.     ENDIF
  1511.  
  1512. ;
  1513. ; pascal CMError CMConvertFixedXYZToXYZ(const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  1514. ;
  1515.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1516.         Macro
  1517.         _CMConvertFixedXYZToXYZ
  1518.             move.l              #$000C0057,D0
  1519.             dc.w                $ABEE
  1520.         EndM
  1521.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1522.         IMPORT_CFM_FUNCTION CMConvertFixedXYZToXYZ
  1523.     ENDIF
  1524.  
  1525. ;  PS-related 
  1526. ;
  1527. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1528. ;
  1529.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1530.         Macro
  1531.         _CMGetPS2ColorSpace
  1532.             move.l              #$0014002E,D0
  1533.             dc.w                $ABEE
  1534.         EndM
  1535.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1536.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1537.     ENDIF
  1538.  
  1539. ;
  1540. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1541. ;
  1542.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1543.         Macro
  1544.         _CMGetPS2ColorRenderingIntent
  1545.             move.l              #$0014002F,D0
  1546.             dc.w                $ABEE
  1547.         EndM
  1548.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1549.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1550.     ENDIF
  1551.  
  1552. ;
  1553. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1554. ;
  1555.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1556.         Macro
  1557.         _CMGetPS2ColorRendering
  1558.             move.l              #$00180030,D0
  1559.             dc.w                $ABEE
  1560.         EndM
  1561.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1562.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1563.     ENDIF
  1564.  
  1565. ;
  1566. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1567. ;
  1568.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1569.         Macro
  1570.         _CMGetPS2ColorRenderingVMSize
  1571.             move.l              #$0010003D,D0
  1572.             dc.w                $ABEE
  1573.         EndM
  1574.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1575.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1576.     ENDIF
  1577.  
  1578.  
  1579. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1580. ;
  1581. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1582. ;
  1583.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1584.         Macro
  1585.         _CWNewColorWorld
  1586.             move.l              #$000C0000,D0
  1587.             dc.w                $ABEE
  1588.         EndM
  1589.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1590.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1591.     ENDIF
  1592.  
  1593. ;
  1594. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1595. ;
  1596.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1597.         Macro
  1598.         _ConcatenateProfiles
  1599.             move.l              #$000C000C,D0
  1600.             dc.w                $ABEE
  1601.         EndM
  1602.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1603.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1604.     ENDIF
  1605.  
  1606. ;
  1607. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1608. ;
  1609.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1610.         Macro
  1611.         _CMBeginMatching
  1612.             move.l              #$000C000A,D0
  1613.             dc.w                $ABEE
  1614.         EndM
  1615.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1616.         IMPORT_CFM_FUNCTION CMBeginMatching
  1617.     ENDIF
  1618.  
  1619. ;
  1620. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1621. ;
  1622.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1623.         Macro
  1624.         _CMDrawMatchedPicture
  1625.             move.l              #$000C0009,D0
  1626.             dc.w                $ABEE
  1627.         EndM
  1628.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1629.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1630.     ENDIF
  1631.  
  1632. ;
  1633. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1634. ;
  1635.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1636.         Macro
  1637.         _CMUseProfileComment
  1638.             move.l              #$00040008,D0
  1639.             dc.w                $ABEE
  1640.         EndM
  1641.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1642.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1643.     ENDIF
  1644.  
  1645. ;
  1646. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1647. ;
  1648.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1649.         Macro
  1650.         _CMGetProfileName
  1651.             move.l              #$0008000E,D0
  1652.             dc.w                $ABEE
  1653.         EndM
  1654.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1655.         IMPORT_CFM_FUNCTION CMGetProfileName
  1656.     ENDIF
  1657.  
  1658. ;
  1659. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1660. ;
  1661.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1662.         Macro
  1663.         _CMGetProfileAdditionalDataOffset
  1664.             move.l              #$0004000F,D0
  1665.             dc.w                $ABEE
  1666.         EndM
  1667.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1668.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1669.     ENDIF
  1670.  
  1671.  
  1672. ;  ProfileResponder functions 
  1673. ;
  1674. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1675. ;
  1676.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1677.         Macro
  1678.         _GetProfile
  1679.             move.l              #$00100005,D0
  1680.             dc.w                $ABEE
  1681.         EndM
  1682.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1683.         IMPORT_CFM_FUNCTION GetProfile
  1684.     ENDIF
  1685.  
  1686. ;
  1687. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1688. ;
  1689.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1690.         Macro
  1691.         _SetProfile
  1692.             move.l              #$000C0006,D0
  1693.             dc.w                $ABEE
  1694.         EndM
  1695.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1696.         IMPORT_CFM_FUNCTION SetProfile
  1697.     ENDIF
  1698.  
  1699. ;
  1700. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1701. ;
  1702.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1703.         Macro
  1704.         _SetProfileDescription
  1705.             move.l              #$00100010,D0
  1706.             dc.w                $ABEE
  1707.         EndM
  1708.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1709.         IMPORT_CFM_FUNCTION SetProfileDescription
  1710.     ENDIF
  1711.  
  1712. ;
  1713. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1714. ;
  1715.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1716.         Macro
  1717.         _GetIndexedProfile
  1718.             move.l              #$00140012,D0
  1719.             dc.w                $ABEE
  1720.         EndM
  1721.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1722.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1723.     ENDIF
  1724.  
  1725. ;
  1726. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1727. ;
  1728.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1729.         Macro
  1730.         _DeleteDeviceProfile
  1731.             move.l              #$000C0013,D0
  1732.             dc.w                $ABEE
  1733.         EndM
  1734.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1735.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  1736.     ENDIF
  1737.  
  1738.  
  1739.     IF OLDROUTINENAMES THEN
  1740. ;  constants 
  1741.  
  1742. kMatchCMMType                    EQU        $00000001
  1743. kMatchApplProfileVersion        EQU        $00000002
  1744. kMatchDataType                    EQU        $00000004
  1745. kMatchDeviceType                EQU        $00000008
  1746. kMatchDeviceManufacturer        EQU        $00000010
  1747. kMatchDeviceModel                EQU        $00000020
  1748. kMatchDeviceAttributes            EQU        $00000040
  1749. kMatchFlags                        EQU        $00000080
  1750. kMatchOptions                    EQU        $00000100
  1751. kMatchWhite                        EQU        $00000200
  1752. kMatchBlack                        EQU        $00000400
  1753. ;  types 
  1754. CMYKColor                RECORD 0
  1755. f                         ds        CMCMYKColor
  1756. sizeof                     EQU *                    ; size:   $8 (8)
  1757.                         ENDR
  1758.  
  1759.  
  1760. ; typedef CMWorldRef                     CWorld
  1761.  
  1762. ; typedef long *                        CMGamutResult
  1763.  
  1764. ;  functions 
  1765. ;
  1766. ; pascal void EndMatching(CMMatchRef myRef)
  1767. ;
  1768.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1769.         Macro
  1770.         _EndMatching
  1771.             move.l              #$0004000B,D0
  1772.             dc.w                $ABEE
  1773.         EndM
  1774.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1775.         IMPORT_CFM_FUNCTION EndMatching
  1776.     ENDIF
  1777.  
  1778. ;
  1779. ; pascal void EnableMatching(Boolean enableIt)
  1780. ;
  1781.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1782.         Macro
  1783.         _EnableMatching
  1784.             move.l              #$0002000D,D0
  1785.             dc.w                $ABEE
  1786.         EndM
  1787.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1788.         IMPORT_CFM_FUNCTION EnableMatching
  1789.     ENDIF
  1790.  
  1791. ;
  1792. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1793. ;
  1794.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1795.         Macro
  1796.         _GetColorSyncFolderSpec
  1797.             move.l              #$000C0011,D0
  1798.             dc.w                $ABEE
  1799.         EndM
  1800.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1801.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  1802.     ENDIF
  1803.  
  1804. ;
  1805. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1806. ;
  1807.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1808.         Macro
  1809.         _BeginMatching
  1810.             move.l              #$000C000A,D0
  1811.             dc.w                $ABEE
  1812.         EndM
  1813.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1814.         IMPORT_CFM_FUNCTION BeginMatching
  1815.     ENDIF
  1816.  
  1817. ;
  1818. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1819. ;
  1820.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1821.         Macro
  1822.         _DrawMatchedPicture
  1823.             move.l              #$000C0009,D0
  1824.             dc.w                $ABEE
  1825.         EndM
  1826.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1827.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  1828.     ENDIF
  1829.  
  1830. ;
  1831. ; pascal CMError UseProfile(CMProfileHandle profile)
  1832. ;
  1833.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1834.         Macro
  1835.         _UseProfile
  1836.             move.l              #$00040008,D0
  1837.             dc.w                $ABEE
  1838.         EndM
  1839.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1840.         IMPORT_CFM_FUNCTION UseProfile
  1841.     ENDIF
  1842.  
  1843. ;
  1844. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1845. ;
  1846.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1847.         Macro
  1848.         _GetProfileName
  1849.             move.l              #$0008000E,D0
  1850.             dc.w                $ABEE
  1851.         EndM
  1852.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1853.         IMPORT_CFM_FUNCTION GetProfileName
  1854.     ENDIF
  1855.  
  1856. ;
  1857. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1858. ;
  1859.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1860.         Macro
  1861.         _GetProfileAdditionalDataOffset
  1862.             move.l              #$0004000F,D0
  1863.             dc.w                $ABEE
  1864.         EndM
  1865.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1866.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  1867.     ENDIF
  1868.  
  1869.     ENDIF    ; OLDROUTINENAMES
  1870.  
  1871. ;  Deprecated stuff
  1872.  
  1873. ;  PrGeneral parameter blocks 
  1874. TEnableColorMatchingBlk    RECORD 0
  1875. iOpCode                     ds.w    1                ; offset: $0 (0)
  1876. iError                     ds.w    1                ; offset: $2 (2)
  1877. lReserved                 ds.l    1                ; offset: $4 (4)
  1878. hPrint                     ds.l    1                ; offset: $8 (8)
  1879. fEnableIt                 ds.b    1                ; offset: $C (12)
  1880. filler                     ds.b    1                ; offset: $D (13)
  1881. sizeof                     EQU *                    ; size:   $E (14)
  1882.                         ENDR
  1883. TRegisterProfileBlk        RECORD 0
  1884. iOpCode                     ds.w    1                ; offset: $0 (0)
  1885. iError                     ds.w    1                ; offset: $2 (2)
  1886. lReserved                 ds.l    1                ; offset: $4 (4)
  1887. hPrint                     ds.l    1                ; offset: $8 (8)
  1888. fRegisterIt                 ds.b    1                ; offset: $C (12)
  1889. filler                     ds.b    1                ; offset: $D (13)
  1890. sizeof                     EQU *                    ; size:   $E (14)
  1891.                         ENDR
  1892.     ENDIF ; __CMAPPLICATION__ 
  1893.  
  1894.